﻿<?php
// hook_views_query_alter
function listpagefilter_views_query_alter(&$view, &$query) {
	if ($view->name == 'article_list_page'){
	  if (arg(2) == 's_time')  $query->orderby = array(array('field' => 'node.created','direction' => 'DESC'));
	  if (arg(2) == 's_comment') $query->orderby = array(array('field' => 'node_comment_statistics.comment_count','direction' => 'DESC'));
  }
}